import sun.util.resources.cldr.nn.CalendarData_nn_NO;

/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/4/1
 * Time: 18:16
 * Description: No Description
 */

class Animal1 {
    public int a = 20;
    public int c = 30;

}

class eat1 extends Animal1 {
    public int a = 10;
    public int b = 20;

    public void ands() {
        System.out.println(super.a);
        System.out.println(this.b);
        System.out.println(this.c);

    }

}
/*
成员变量不重复
* */
class Animal {
    public String name;
    public int age;
    public String Sex;

    public void well() {
        System.out.println(this.name+"旺旺~~~~");
    }

    public void sleep() {
        System.out.println(this.name+"睡觉");
    }
}

class Dog extends Animal {


    public Dog(String name) {
        this.name = name;
    }


}

class Eat extends Animal {

    public Eat(String name) {
        this.name = name;
    }

}

public class TestDemo1 {
    public static void main(String[] args) {
        eat1 eat2 = new eat1();
        eat2.ands();

    }
    public static void main1(String[] args) {
        Dog dog = new Dog("旺财");
        Eat eat = new Eat("咪咪");
        dog.sleep();
        dog.well();
        eat.sleep();
        eat.well();
    }
}